package com.heo.music.player.dto.base;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;

import java.util.Collections;
import java.util.List;

/**
 * created by 2022-05-12 10:45
 * @author 星天无极
 **/
@EqualsAndHashCode(callSuper = true)
@ApiModel(description = "错误的参数响应消息体")
@Data
@NoArgsConstructor
@AllArgsConstructor
public class BadRequestMsg extends ResponseMsg {

    @ApiModelProperty("错误详情")
    private List<String> details;

    public BadRequestMsg(String message, String detail) {
        super(message);
        this.details = Collections.singletonList(detail);
    }
}
